package iosu.java.games.razer.server;

import iosu.java.games.razer.characters.Car;

public class ServerCar {
	private int centerx;
	private int centery;
	private int rotation;
	private boolean accelerating;
	private boolean braking;
	private boolean rotatingleft;
	private boolean rotatingright;
	private boolean snared;
	
	public int getCenterx() {
		return centerx;
	}
	public void setCenterx(int centerx) {
		this.centerx = centerx;
	}
	public int getCentery() {
		return centery;
	}
	public void setCentery(int centery) {
		this.centery = centery;
	}
	public int getRotation() {
		return rotation;
	}
	public void setRotation(int rotation) {
		this.rotation = rotation;
	}
	public boolean isAccelerating() {
		return accelerating;
	}
	public void setAccelerating(boolean accelerating) {
		this.accelerating = accelerating;
	}
	public boolean isBraking() {
		return braking;
	}
	public void setBraking(boolean braking) {
		this.braking = braking;
	}
	public boolean isRotatingleft() {
		return rotatingleft;
	}
	public void setRotatingleft(boolean rotatingleft) {
		this.rotatingleft = rotatingleft;
	}
	public boolean isRotatingright() {
		return rotatingright;
	}
	public void setRotatingright(boolean rotatingright) {
		this.rotatingright = rotatingright;
	}
	
	public ServerCar(int x, int y, int orientation, 
			boolean rotatingleft, boolean rotatingright,boolean accelerating, boolean braking, boolean snared ){
		this.centerx = x;
		this.centery=y;
		this.rotation = orientation;
		this.accelerating=accelerating;
		this.braking = braking;
		this.rotatingleft = rotatingleft;
		this.rotatingright = rotatingright;
		this.snared = snared;
		
	}
	
//	public ServerCar(String x, String y, String orientation, 
//			 String rotatingleft, String rotatingright,String accelerating, String braking){
//		this.centerx = Integer.parseInt(x);
//		this.centery=Integer.parseInt(y);
//		this.rotation = Integer.parseInt(orientation);
//		this.accelerating=Boolean.parseBoolean(accelerating);
//		this.braking = Boolean.parseBoolean(braking);
//		this.rotatingleft = Boolean.parseBoolean(rotatingleft);
//		this.rotatingright = Boolean.parseBoolean(rotatingright);
		
//	}
	
	@Override
	public String toString() {
		return "ServerCar [centerx=" + centerx + ", centery=" + centery
				+ ", rotation=" + rotation + ", accelerating=" + accelerating
				+ ", braking=" + braking + ", rotatingleft=" + rotatingleft
				+ ", rotatingright=" + rotatingright + "]";
	}
	
	/*
	 * car = new Car(character, 200, 200);
		enemy1 = new Car(enemy1img, 200, 240);
		enemy2 = new Car(enemy2img, 200, 280);
		enemy3 = new Car(enemy3img, 200, 320);
	 */

	public static ServerCar defaultCar1(){
		return new ServerCar(30,260,0,false,false,false,false,false);
	}
	
	public static ServerCar defaultCar2(){
		return new ServerCar(60,260,0,false,false,false,false,false);
	}
	public static ServerCar defaultCar3(){
		return new ServerCar(90,260,0,false,false,false,false,false);
	}
	public static ServerCar defaultCar4(){
		return new ServerCar(110,260,0,false,false,false,false,false);
	}
	public boolean isSnared() {
		return snared;
	}
	public void setSnared(boolean snared) {
		this.snared = snared;
	}
}
